import java.util.Scanner;

public class GeometryCalculator {
    static double  PI = 3.14;
    static double area;
    double radius;
    double width;
    double height;
    public double calculateCircleArea(double radius) {
        area = PI * radius *radius;
        return area;
    }
    public double calculateRectangleArea(double width, double height){
        area = width * height;
        return area;
    }
}
class GeometryCalculatorTest{
    public static void main(String[] args) {
        GeometryCalculator num = new GeometryCalculator();
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入半径：");
        num.radius = sc.nextDouble();
        System.out.println("圆的面积为：" + num.calculateCircleArea(num.radius));
        System.out.println("请输入长");
        num.width = sc.nextDouble();
        System.out.println("请输入宽");
        num.height = sc.nextDouble();
        System.out.println("矩形的面积为：" + num.calculateRectangleArea(num.width, num.height));

    }
}
